Arrows

??=[basics.arrows] An `??w![arrow]' in an -pic diagram is a generic term for the drawn decorations that are added to the basic matrix structure. In -pic all arrows must be specified along with the entry they start in; this is called their "??w![base entry]". Each particular arrow then refers explicitly to its "??w![target entry]".

The most commonly used arrows have names starting with either ??c![u] or ??c![d] for up or down, followed by either ??c![l] or ??c![r] for left and right, , the arrow || reads `down and then right to'. Figure ??[f:directions] shows the possible straight arrows, all leaving the entry "base" and ending at the entry with their name in. The relative coordinates specified in this way are purely logical, , if the diagram contains very wide entries then the arrows will be nearly horizontal. All the constructed arrows are aligned along the line between the centers of the base and target entries; they will not automatically disappear under entries that they cross (we discuss how this is achieved in section ??[arrows.pass]).

Figure: Standard directions for straight arrows.
\begin{figure*}\begin{displaymath}\let\1=\relax
\diagram
\1??c![\uullto]&\1??c...
...o] &\1??c![\ddrrto]
\enddiagram\end{displaymath}
??=[f:directions]
\end{figure*}

If you are making large diagrams where the above predefined arrows are not sufficient then you can always resort to the general form |[|"hop"|]|??c[] where "hop" should be a sequence of the letters |dulr| as described above, , |[u]| is equivalent to || but |[uuulll]| has no short-form equivalent.

The directions also exist with |to| replaced by various other basic line styles:

$\displaystyle \spreaddiagramcolumns$-2pc$\displaystyle \objectwidth$3pc$\displaystyle \diagram$??c![to]$\displaystyle \xto$ + < 1pc, -2pc > * & ??c![line]$\displaystyle \xline$ + < 1pc, -2pc > * & ??c![dashed]$\displaystyle \xdashed$ + < 1pc, -2pc > * & ??c![dotted]$\displaystyle \xdotted$ + < 1pc, -2pc > * & ??c![double]$\displaystyle \xdouble$ + < 1pc, -2pc > * &
$\displaystyle \diagram$


\begin{exercise}
\begin{code}
\diagram
\bullet \ddashed\drdouble\rline
& \bull...
...{displaymath}\answercode
\answertext{The author did \displaycode}
\end{exercise}

In "v3" mnemonic names are used for arrows, , the five basic line styles above correspond to arrows |->|, |-|, |–|, |..|, and |=|.